home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
501-525
/
disk_517
/
aequipot
/
source
/
reqlibrary.i
< prev
Wrap
Text File
|
1992-05-06
|
8KB
|
194 lines
{ reqlibrary.h © 1988/1989/1990 reserved by Colin Fox and Bruce Dawson }
{ changed for PCQ-Pascal 91/06/12 by Juergen Matern }
{ $Filename: libraries/reqbase.i $
$Release: 2.0 release 1 $
$Revision: 2.5 $
$Date: 90/11/23 $
req.library definitions }
{$I "Include:dos.i" }
{$I "Include:Intuition.i" }
{$I "Include:Graphics.i" }
{ This structure is for use with the GetLong function.}
CONST
GLNODEFAULTM = 1; {Set this in the flags if you don't want a default}
{value to show up in the get long string gadget. For}
{some things this is much better than having a zero}
{show up.}
TYPE
GetLongStruct = Record
titlebar : Address;
defaultval : Integer;
minlimit : Integer;
maxlimit : Integer;
result : Integer;
Window : WindowPtr;
versionnumber : Short; { Make SURE this is set to REQVERSION. }
flags : Integer; { Some, uh flags. See above for definitions. }
rfu2 : Integer; { Make SURE you leave these two zeroed also. }
END;
GetLongPtr = ^GetLongStruct;
GetStringStruct = Record
titlebar : Address;
stringbuffer : Address;
Window : WindowPtr;
stringsize : Short; { how many characters in the buffer }
visiblesize : Short; { how many characters show on screen }
versionnumber: Short; { make sure this is REQVERSION }
flags : Integer;
rfu1 : Integer;
rfu2 : Integer;
rfu3 : Integer;
END;
GetStringPtr = ^GetStringStruct;
CONST
REQVERSION = 2;
DSIZE = 130;
FCHARS = 30;
WILDLENGTH = 30;
{ These are the mask values that you can OR into the Flags field of the
file requester structure. }
FRQSHOWINFOM = $0001; { Set this in Flags if you want .info files to show. They default to hidden. }
FRQEXTSELECTM = $0002; { Set this in Flags if you want extended select. Default is not. }
FRQCACHINGM = $0004; { Set this in Flags if you want directory caching. Default is not. }
FRQGETFONTSM = $0008; { Set this in Flags if you want a font requester rather than a file requester. }
FRQINFOGADGETM = $0010; { Set this in Flags if you want a hide-info files gadget. }
FRQHIDEWILDSM = $0020; { Set this in Flags if you DON'T want 'show' and 'hide' string gadgets. }
FRQABSOLUTEXYM = $0040; { Use absolute x,y positions rather than centering on mouse. }
FRQCACHEPURGEM = $0080; { Purge the cache whenever the directory date stamp changes if this is set. }
FRQNOHALFCACHEM = $0100; { Don't cache a directory unless it is completely read in when this is set. }
FRQNOSORTM = $0200; { Set this in Flags if you DON'T want sorted directories. }
FRQNODRAGM = $0400; { Set this in Flags if you DON'T want a drag bar and depth gadgets. }
FRQSAVINGM = $0800; { Set this if you are selecting a file to save to. }
FRQLOADINGM = $1000; { Set this if you are selecting a file(s) to load from. }
{ These two (save and load) aren't currently used for }
{ anything, but they may be in the future, so you should }
{ remember to set them. Also, these bits make it easier if }
{ somebody wants to customize the file requester for their }
{ machine. They can make it behave differently for loading }
{ vs saving. }
FRQDIRONLYM = $2000; { Allow the user to select a directory, rather than a file. }
TYPE
ReqFileRequester = Record
VersionNumber : Short; { Make sure this is set to REQVERSION. }
Title : Address; { Hailing text }
_Dir : Address; { Directory array (DSIZE+1) }
_File : Address; { Filename array (FCHARS+1) }
PathName : Address; { Complete path name array (DSIZE+FCHARS+2) }
Window : WindowPtr; { Window requesting or NULL }
MaxExtendedSelect : Short; { Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.}
numlines : Short; { Number of lines in file window. }
numcolumns : Short; { Number of columns in file window. }
devcolumns : Short;
Flags : Integer; { Various - umm - flags. See above for more info. }
dirnamescolor : Short; { These five colors will all default }
filenamescolor : Short { to color one if you don't specify };
devicenamescolor : Short; { a color (ie; if you specify color zero). }
fontnamescolor : Short; { If you want color zero to be used, specify }
fontsizecolor : Short; { color 32, or some other too large number }
{ which mods down to zero. }
detailcolor : Short; { If both of these colors are specified as }
blockcolor : Short; { zero then the block pen will be set to one. }
gadgettextcolor : Short; { The color for the text of the five boolean gadgets. Defaults to 1. }
textmessagecolor : Short; { The color for the message at the screen top. Defaults to 1. }
stringnamecolor : Short; { The color for the words Drawer, File, Hide and Show. Defaults to 3. }
stringgadgetcolor : Short; { The color for the borders of the string gadgets. Defaults to 3. }
{ Unfortunately it is not possible to specify }
{ the color of the actual text in an Intuition }
{ string gadget. }
boxbordercolor : Short; { The color for the boxes around the file and directory areas. Defaults to 3. }
gadgetboxcolor : Short; { The color for the boxes around the five boolean gadgets. Defaults to 3. }
FRU_Stuff : Array [1..18] of Short; { This area, which is reserved for }
{ future use, should all be zero. }
DirDateStamp : DateStampRec; { A copy of the cached directories date stamp. }
{ There should never be any need to change this. }
WindowLeftEdge : Short; { These two fields are used for the Center }
WindowTopEdge : Short; { function. See the Center() function docs }
{ for their explanation. }
FontYSize : Short; { These fields are used to return the selected }
FontStyle : Short; { font size and style, only applicable when the }
{ font bit is set. }
{ If you set the extended select bit and the user extended selects, the list of filenames will start from here.}
ExtendedSelect : Address;
Hide : Array [1..WILDLENGTH+2] of char; { The wildcards text. }
Show : Array [1..WILDLENGTH+2] of char; { More wildcards text. }
FileBufferPos : Short; { Various fields taken from the various }
FileDispPos : Short; { string gadgets so that the cursor }
DirBufferPos : Short; { can be returned to the same position }
DirDispPos : Short; { on subsequent calls. }
HideBufferPos : Short;
HideDispPos : Short;
ShowBufferPos : Short;
ShowDispPos : Short;
{ The following fields are PRIVATE! Don't go messing with them or
wierd things may/will happen. If this isn't enough of a warning, go read
the one in intuition.h, that should scare you off. }
Memory : Address; { Memory allocate for dir entries. }
Memory2 : Address; { More memory, used for hidden files. }
Lock : Address;
PrivateDirBuffer : Array [1..DSIZE+2] of char; { Used for keeping a record of which }
{ directory we have file names for. }
FileInfoBlock : FileInfoBlockPtr;
NumEntries : Short;
NumHiddenEntries : Short;
filestartnumber : Short;
devicestartnumber : Short;
end;
ReqFileReqPtr = ^ReqFileRequester;
VAR
ReqBase : Address;
Function FileRequester (ReqFileReq : ReqFileReqPtr) : BOOLEAN;
External;
Procedure PurgeFiles (ReqFileReq : ReqFileReqPtr);
External;
Procedure SimpleRequest (st : String);
External;
Function TwoGadRequest (st : String) : Short;
External;
Function GetLong (ls : GetLongPtr) : Boolean;
External;
Function NewGetString (gs : GetStringPtr) : Boolean;
External;
Procedure ColorRequester (c : Integer);
External;
Procedure Center (y, x : Short; nw : NewWindowPtr );
External;
Procedure DrawBox(MaY, MaX, MiY, MiX : Integer; rp : RastPortPtr);
External;